package com.tianlu.store.mapper;

import com.tianlu.store.entity.ShoppingCar;
import org.apache.ibatis.annotations.Mapper;
import com.tianlu.store.common.MyBaseMapper;

import java.util.List;

/**
 * @Author 梁东烂
 * @Desc 购物车表(ShoppingCar)表数据库访问层
 * @Date 2023-04-27 14:07:33
 */
@Mapper
public interface ShoppingCarMapper extends MyBaseMapper<ShoppingCar> {
    /**
     * 从购物车中删除
     *
     * @param productIdList 产品id
     * @param userId        用户id
     * @author liangdl
     * @since 2023/4/27 14:19
     */
    void deleteProduct(List<Long> productIdList, Long userId);

    /**
     * 清空购物车
     *
     * @param userId 用户id
     * @author liangdl
     * @since 2023/4/27 14:19
     */
    void deleteByUserId(Long userId);
}
